package com.nicholas.exampleweb.service.impl;

import com.nicholas.exampleweb.model.User;
import com.nicholas.exampleweb.repository.UserRepository;
import com.nicholas.exampleweb.service.UserService;
import com.nicholas.exampleweb.util.DBManager;
import com.nicholas.week1.annotation.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    private UserRepository userRepository = new UserRepository();

    @Override
    public void register(User user) {
        userRepository.save(user);
    }

    @Override
    public List<User> queryAll() {
        return userRepository.queryAll();
    }
}
